import React, { useEffect, useState } from "react";
import Son from "./Son";

const Father = () => {
  const [fatherData] = useState("我是父组件的数据");
  return (
    <div className="App">
      <h1>父子组件通信</h1>
      <h2>我是父组件</h2>
      <p>父传子，通过props传值</p>
      <hr />
      <Son fatherData={fatherData}></Son>
    </div>
  );
};

export default Father;
